package com.douwong.student.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @autor yichao
 * @time 2016/8/269:44
 * @des 网络流向目的地
 */
public enum  E_Destination {
    ss(0),
  /**服务端*/
    server(1),
  /**云平台*/
    cloud(2),
    /**教师端*/
    teacher(3),
    /**学生端*/
    student(4);

    private    int value;
    E_Destination(int value) {
      this.value=value;
    }



  public void setValue(int value) {
    this.value = value;
  }
  @JsonValue
  public int getValue() {
    return value;
  }
  @JsonCreator
  public static E_Destination getItem(int value){
    for(E_Destination item :values()){
      if (item.getValue()==value){
        return item;
      }
    }
    return null;
  }
}
